<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="销售服务中心列表" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="销售服务中心名称" ng-model="condition.nameLike">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                 reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">销售服务中心名称：</label>
                        <input type="text" class="form-control" ng-model="condition.nameLike">
                    </div>
                </div>
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">销售服务中心代码：</label>
                        <input type="text" class="form-control" ng-model="condition.code">
                    </div>
                </div>
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">省市代码：</label>
                        <input type="text" class="form-control" ng-model="condition.proCityCode">
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true"
                 has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth" fixed-width="tbStyle.scrollLeft"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.curRow}" ng-click="selectRow($index)">
                                    <td class="spill-dots border-l-none" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <button class="btn btn-operate m-r-xs" ng-click="getBindProCitys(item)">绑定省市</button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.curRow}"
                                    ng-click="selectRow($index)">
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        {{item[itemCol.dataField]}}
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="绑定省市" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div class="main-area" style="top:70px;bottom:70px">
                <div yb-table-fixed class="table-fixed-wrap col-xs-5">
                    <div class="th-scroll-x">
                        <table class="table border-none">
                            <thead>
                                <tr>
                                    <th width="60">操作</th>
                                    <th>销售服务中心</th>
                                    <th width="30%">省</th>
                                    <th width="30%">市</th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="bindProCityList.length > 0">
                        <table class="table border-none">
                            <tbody>
                                <tr ng-repeat="item in bindProCityList track by $index">
                                    <td width="60">
                                        <button class="btn btn-operate" ng-click="delProcity($index, true)">删除</button>
                                    </td>
                                    <td class="spill-dots" title="{{item.mc}}">{{item.mc}}</td>
                                    <td width="30%" class="spill-dots" title="{{item.province}}">{{item.province}}</td>
                                    <td width="30%" class="spill-dots" title="{{item.city}}">{{item.city}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="bindProCityList.length == 0">暂时没有数据</div>
                </div>
                <div class="col-xs-7" style="left: 43%;">
                    选择省市
                    <div class="group" ng-init="open=false" style="max-height: 470px;overflow-y:auto;">
                        <div class="group-item" ng-repeat="pro in proCityDatas">
                            <div class="group-item-head" style="border-top:none;">
                                <!-- true notAll false -->
                                <div yb-check-box yb-checked="pro.isChecked" yb-check-name="{{pro.name}}" yb-click="selectProvince(pro)"  class="col-xs-11"></div>
                                <span ng-switch="open" ng-click="open=!open" ng-show="pro.districtList.length > 0" class="col-xs-1" style="position: relative;">
                                    <span ng-switch-when="false">展开 <i class="yb-icon ico-angle-double-down font-12"></i></span>
                                    <span ng-switch-when="true">收起 <i class="yb-icon ico-angle-double-up font-12"></i></span>
                                </span>
                            </div>
                            <div class="group-item-body" ng-show="open" style="border-top:none;">
                                <div class="group-item">
                                    <div class="group-item-body p-l-xxl clearfix" style="border-top:none;">
                                        <div yb-check-box class="m-r-md" ng-repeat="city in pro.districtList"
                                            yb-checked="city.isChecked" yb-check-name="{{city.name}}" yb-click="selectCity(pro, city)"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center border-t clearfix">
                <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData()">保存</button>
                <button type="button" class="btn btn-default" ng-click="changeTab(0)">取消</button>
            </div>
        </div>
    </div>
</div>